package com.dao.impl;

import java.util.List;

import com.dao.UserDao;

public class UserDaoImpl extends UniversalDaoImpl implements UserDao {

	@Override
	public List getListUser(String roleCode) {
		String sql;
		sql="select region.name region_treeName,u.* from [user] u inner join region on u.region_treeCode=region.code where role_code='"+roleCode+"'";
		logger.info(sql);
		return queryForList(sql);
	}

	@Override
	public boolean getModifyPwd(String loginName, String pwd) {
		String sql;
		sql="update [user] set pwd='"+pwd+"' where loginName='"+loginName+"'";
		logger.info(sql);
		return execute(sql);
	}

}